package org.eclipse.ea.requisit.manager.utils;

import java.util.Comparator;

import org.eclipse.ea.requisit.manager.popup.model.RequirementCost;

public class RequirementCostsComparator implements Comparator<RequirementCost> {

	@Override
	public int compare(RequirementCost req1, RequirementCost req2) {
		
		if(req1.getCost().doubleValue() < req2.getCost().doubleValue()){
			return 1;
		}
		
		if(req1.getCost().doubleValue() > req2.getCost().doubleValue()){
			return -1;
		}
		
		return 0;
	}

}
